package com.marvels.financial.loan.service;


import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import org.springframework.web.bind.annotation.RequestBody;

import com.github.pagehelper.Page;
import com.marvels.common.dto.pay.McfePaymentUserBindCard;
import com.marvels.common.exception.MarvelsBusinessException;
import com.marvels.financial.loan.dto.HandWithholdConditionDTO;
import com.marvels.financial.loan.dto.HandWithholdListDTO;
import com.marvels.financial.loan.dto.HandleWithholdResultDTO;
import com.marvels.financial.loan.dto.McfeWithholdManualDTO;

/**
 * 手工还款代扣
 * @author tangpw
 *
 */
public interface HandleWithholdApi {
	
	
	/**
	 * 手工代扣-代扣还款-申请列表
	 * @param dto
	 * @return
	 */
	public  Page<HandWithholdListDTO> applyList(HandWithholdConditionDTO dto) throws MarvelsBusinessException; 
	
	
	
	/**
	 * 手工代扣-代扣还款-申请操作
	 * @param dto
	 * @return
	 */
	public void handleWithholeApply(HandWithholdConditionDTO dto) throws MarvelsBusinessException; 
	
	
	/**
	 * 手工代扣-代扣还款-审核列表
	 * @param dto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Page<HandWithholdListDTO> handleWithholeReviewList(HandWithholdConditionDTO dto) throws MarvelsBusinessException;
	
	
	
	
	/**
	 * 手工代扣-代扣还款-审批通过
	 * @param dto
	 * @throws MarvelsBusinessException
	 */
	public void handleWithholeReviewAdopt(McfeWithholdManualDTO mcfeWithholdManualDTO) throws MarvelsBusinessException;
	
	
	/**
	 * 手工代扣-代扣还款-审批拒绝
	 * @param dto
	 * @throws MarvelsBusinessException
	 */
	public void handleWithholeReviewRefuse(HandWithholdConditionDTO dto) throws MarvelsBusinessException;
	
	
	/**
	 * 手工代扣-代扣还款-审批结果
	 * @param dto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public List<HandleWithholdResultDTO> handleWithholeReviewResult (@RequestBody HandWithholdConditionDTO dto)  throws MarvelsBusinessException;
	
	
	/**
	 * 根据银行卡总行号拆分金额
	 * @param amount
	 * @param bankHeadLink
	 * @return
	 */
	public BigDecimal[] amountSplit(BigDecimal amount, String bankHeadLink);
	
	/**
	 * 
	* @Title: extensionWithholeReviewAdopt 
	* @Description:展期费用审核通过调用  
	* @param dto
	* @throws MarvelsBusinessException       
	* @author 李瑶
	* @date 2018年10月31日 下午8:36:46
	 */
	public  void extensionWithholeReviewAdopt(McfeWithholdManualDTO mcfeWithholdManualDTO) throws MarvelsBusinessException;
	
	
	/**
	 * 
	* @Title: handleWithholeApprove 
	* @Description:  
	* @param dto
	* @throws MarvelsBusinessException       
	* @author 李瑶
	* @date 2018年10月31日 下午8:54:49
	 */
	public  void handleWithholeApprove(HandWithholdConditionDTO dto) throws MarvelsBusinessException;
	
	/**
	 * 查询用户有效的银行卡
	 * @param param
	 * @return
	 * @throws MarvelsBusinessException
	 */
	List<Map<String, Object>> queryUserBankList(McfePaymentUserBindCard param) throws MarvelsBusinessException;
	
}
